<?php
namespace app\common\model;

class CommentComm extends BaseCommon
{
    ///主键id
    protected $pk = 'com_id';
    ///表名
    protected $table = 'dh_comment';


    ///入库新评论
    public function insNewComment($data = array()){
        return $this->insert($data);
    }

    ///获取此ip今日评论数
    public function getThisIpCommentLimit($com_ip){
        return $this->where('com_ip',$com_ip)->whereTime('create_time', 'today')->count();
    }
}